{% extends 'PHPDishWebBundle:Common:setting_layout.html.twig' %}

{% block title %} 修改密码 {% endblock %}
{% block script %}
    <script type="text/javascript" src="{{ asset('build/js/setting.js') }}"></script>
{% endblock %}

{% block setting_content %}

    <div class="panel panel-u">
        <div class="panel-heading">修改密码</div>
        <div class="panel-heading">
            {{ form_start(form, { 'action': path('fos_user_change_password'), 'attr': { 'class': 'fos_user_change_password' } }) }}
            <div class="form-group">
                {{ form_label(form.current_password) }}
                {{ form_widget(form.current_password, {'attr': {'class': 'form-control', 'placeholder': '当前密码'}}) }}
                {{ form_errors(form.current_password) }}
            </div>
            <div class="form-group">
                {{ form_label(form.plainPassword.first) }}
                {{ form_widget(form.plainPassword.first, {'attr': {'class': 'form-control', 'placeholder': '新密码'}}) }}
                {{ form_errors(form.plainPassword.first) }}
            </div>
            <div class="form-group">
                {{ form_label(form.plainPassword.second) }}
                {{ form_widget(form.plainPassword.second, {'attr': {'class': 'form-control', 'placeholder': '重复密码'}, 'required': false}) }}
                {{ form_errors(form.plainPassword.second) }}
            </div>
            <div class="form-group">
                <button type="submit" class="btn u-btn-primary submit-btn"><i class="if i-publish"></i> 修改</button>
            </div>
            {{ form_end(form) }}
        </div>
    </div>

{% endblock %}